package com.hyl.domain.trade.service;

import com.hyl.domain.trade.model.entity.MarketPayOrderEntity;
import com.hyl.domain.trade.model.entity.PayActivityEntity;
import com.hyl.domain.trade.model.entity.PayDiscountEntity;
import com.hyl.domain.trade.model.entity.UserEntity;
import com.hyl.domain.trade.model.valobj.GroupBuyProgressVO;

/**
 * @author hyl
 * @description 用户拼单服务接口
 * @create 2025-07-02 10:03
 */
public interface ITradeLockOrderService {


    /**
     * 查询，未被支付消费完成的营销优惠订单
     *
     * @param userId     用户ID
     * @param outTradeNo 外部唯一单号
     * @return 拼团，预购订单营销实体对象
     */
    MarketPayOrderEntity queryNoPayMarketPayOrderByOutTradeNo(String userId, String outTradeNo);

    /*查询拼团进度*/
    GroupBuyProgressVO queryGroupBuyProgress(String teamId);

    /*锁单*/
    MarketPayOrderEntity lockMarketPayOrder(UserEntity userEntity, PayActivityEntity payActityEntity, PayDiscountEntity payDiscountEntity) throws Exception;


}
